package web.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import web.pojo.Teacher;
import web.service.TeacherService;

@Controller
@RequestMapping("teacher")
public class TeacherController {

    @Autowired
    TeacherService service;

    @ResponseBody
    @RequestMapping("teacherList")
    public List<Teacher> fetchTeacherList() {
        return service.findAllTeacher();
    };
}
